import Vue from 'vue';
import VueRouter from 'vue-router';
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch((err) => err);
};
Vue.use(VueRouter);

const routes = [
    {
        path: '',
        redirect: 'top'
    },
    {
        path: '/top',
        name: 'top',
        component: () => import('@/views/right/top.vue')
    },
    {
        path: '/center',
        name: 'center',
        component: () => import('@/views/right/center.vue')
    },
    {
        path: '/bottom',
        name: 'bottom',
        component: () => import('@/views/right/bottom.vue')
    }
];

const router = new VueRouter({
    routes
});

export default router;
